﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using WCS.Helpers;

namespace WCS.Entity
{
    /// <summary>
    /// 设备站台实体
    /// </summary>
    [SugarTable("WCS_Dev_Station")]
    public class ConveyorStation : WcsDevStation
    {
        /// <summary>
        /// Plc读取状态数据 输送线状态
        /// </summary>
        public ConveyorState conveyorState = new ConveyorState();

        /// <summary>
        /// 读取数据
        /// </summary>
        public ConveyorReadData readData = new ConveyorReadData();

        /// <summary>
        /// 读码设备
        /// </summary>
        public List<WcsReadTrayCode> readTrayCodes = new List<WcsReadTrayCode>();
    }

    /// <summary>
    /// 输送线写入实体
    /// </summary>
    public class ConveyorReadData
    {
        /// <summary>
        /// A001，手动自动
        /// </summary>
        public int AutoAOne { get; set; }

        /// <summary>
        /// A007，手动自动
        /// </summary>
        public int AutoASeven { get; set; }

        /// <summary>
        /// B001，手动自动
        /// </summary>
        public int AutoBOne { get; set; }

        /// <summary>
        /// B007，手动自动
        /// </summary>
        public int AutoBSeven { get; set; }

        /// <summary>
        /// 请求上料
        /// </summary>
        public bool LoadAsk { get; set; }

        /// <summary>
        /// 完成上料
        /// </summary>
        public bool LoadFinish { get; set; }

        /// <summary>
        /// 允许上料A001
        /// </summary>
        public bool AllowAOne { get; set; }

        /// <summary>
        /// 允许上料A007
        /// </summary>
        public bool AllowASeven { get; set; }

        /// <summary>
        /// 允许取料B001
        /// </summary>
        public bool AllowBOne { get; set; }

        /// <summary>
        /// 允许取料B007
        /// </summary>
        public bool AllowBSeven { get; set; }

        /// <summary>
        /// A001已经取完料
        /// </summary>
        public bool GetAOne { get; set; }

        /// <summary>
        /// A007已经取完料
        /// </summary>
        public bool GetASeven { get; set; }

        /// <summary>
        /// B001已经放完料
        /// </summary>
        public bool GetBOne { get; set; }

        /// <summary>
        /// B007已经放完料
        /// </summary>
        public bool GetBSeven { get; set; }

        /// <summary>
        /// PLC出库任务状态
        /// </summary>
        public bool PlcOutState { get; set; }

        /// <summary>
        /// 最高温度
        /// </summary>
        public string TemperatureTop { get; set; }

        /// <summary>
        /// 最低温度
        /// </summary>
        public string TemperatureLowest { get; set;}

        /// <summary>
        /// 最高湿度
        /// </summary>
        public string HumidityTop { get; set;}

        /// <summary>
        /// 最低湿度
        /// </summary>
        public string HumidityLowest { get;set;}
    }
}
